Merged [13770]: Enabled saving ICQ aliases set in Adium to the server. Fixes #466
[adiumx.git] / Gaim Service / ESMeanwhileService.m
blob0e5c5bf95f87ea9d639e59312360cc277f35462c
1 /* 
2  * Adium is the legal property of its developers, whose names are listed in the copyright file included
3  * with this source distribution.
4  * 
5  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6  * General Public License as published by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11  * Public License for more details.
12  * 
13  * You should have received a copy of the GNU General Public License along with this program; if not,
14  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15  */
17 #import "AIStatusController.h"
18 #import "DCGaimMeanwhileJoinChatViewController.h"
19 #import "ESGaimMeanwhileAccount.h"
20 #import "ESGaimMeanwhileAccountViewController.h"
21 #import "ESMeanwhileService.h"
22 #import <AIUtilities/CBApplicationAdditions.h>
24 @implementation ESMeanwhileService
26 //Account Creation
27 - (Class)accountClass{
28         return([ESGaimMeanwhileAccount class]);
31 - (AIAccountViewController *)accountViewController{
32     return([ESGaimMeanwhileAccountViewController accountViewController]);
35 - (DCJoinChatViewController *)joinChatView{
36         return([DCGaimMeanwhileJoinChatViewController joinChatView]);
39 //Service Description
40 - (NSString *)serviceCodeUniqueID{
41         return(@"libgaim-Sametime");
43 - (NSString *)serviceID{
44         return(@"Sametime");
46 - (NSString *)serviceClass{
47         return(@"Sametime");
49 - (NSString *)shortDescription{
50         return(@"Sametime");
52 - (NSString *)longDescription{
53         return(@"Lotus Sametime");
55 - (NSCharacterSet *)allowedCharacters{
56         NSMutableCharacterSet   *allowedCharacters = [[NSCharacterSet alphanumericCharacterSet] mutableCopy];
57         [allowedCharacters formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]];
58         
59         NSCharacterSet  *symbolCharacterSet;
60         if([NSApp isOnPantherOrBetter]){
61                 symbolCharacterSet = [NSCharacterSet symbolCharacterSet];
62         }else{
63                 symbolCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@",.<>/;:\"'[]}{=+-_)(*&^%$#@!`~|\\"];
64         }
65         [allowedCharacters formUnionWithCharacterSet:symbolCharacterSet];
67         [allowedCharacters addCharactersInString:@" "];
69         return([allowedCharacters autorelease]);
71 - (NSCharacterSet *)ignoredCharacters{
72         return([NSCharacterSet characterSetWithCharactersInString:@""]);
74 - (int)allowedLength{
75         return(1000);
77 - (BOOL)caseSensitive{
78         return(YES);
80 - (AIServiceImportance)serviceImportance{
81         return(AIServiceSecondary);
83 - (BOOL)canCreateGroupChats{
84         return(YES);
86 - (void)registerStatuses{
87         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE
88                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
89                                                                           ofType:AIAvailableStatusType
90                                                                   forService:self];
91         
92         [[adium statusController] registerStatus:STATUS_NAME_AWAY
93                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
94                                                                           ofType:AIAwayStatusType
95                                                                   forService:self];
96         
97         [[adium statusController] registerStatus:STATUS_NAME_DND
98                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_DND]
99                                                                           ofType:AIAwayStatusType
100                                                                   forService:self];
101         
102         /*
103          m = g_list_append(m, _("Active"));
104          m = g_list_append(m, _("Away"));
105          m = g_list_append(m, _("Do Not Disturb"));
106          */ 
108 @end